package com.atguigu.dga.governance.assess.demo;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class JavaStreamDemo {
    public static void main(String[] args) {
        List<Integer> integers = Arrays.asList(1, 2, 3, 4, 5, 6);
        List<Integer> collect = integers.stream().filter(num -> num == 1).collect(Collectors.toList());

        System.out.println(collect);
    }
}
